package com.offics.loan.application.dto.user;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

/**
 * 发送短信验证码请求
 */
@Data
@Schema(description = "发送短信验证码请求")
public class SendSmsCodeRequest {

    /**
     * 手机号
     */
    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    @Schema(description = "手机号", example = "13800138000")
    private String phone;

    /**
     * 验证码类型（1-注册，2-登录，3-重置密码）
     */
    @Schema(description = "验证码类型（1-注册，2-登录，3-重置密码）", example = "3")
    private Integer type = 3;
}
